Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle lense_dir based on $::rubysitedir. #67

Closed
wants to merge 1 commit into from

Conversation

bzed
Copy link
Contributor

@bzed bzed commented Jul 6, 2017

Fixes: #65

@mcanevet
Copy link
Member

mcanevet commented Jul 7, 2017

@bzed could you please fix unit tests? Tests are passing on master so there must be something weird in your PR that make them fail.

@bzed bzed force-pushed the lensdir-location branch from ce2acb6 to 486933b Compare July 7, 2017 08:56
@bzed
Copy link
Contributor Author

bzed commented Jul 7, 2017

@mcanevet I gave it a short try, but I fail to understand why it fails. So please take it and fix it or leave it broken.

@@ -14,7 +14,11 @@
end
end

lens_dir = Puppet.version < '4.0.0' ? '/usr/share/augeas/lenses' : '/opt/puppetlabs/puppet/share/augeas/lenses'
if Puppet.version >= '4.0.0' and facts[:rubysitedir] =~ /\/opt\/puppetlabs\/puppet/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is misplaced, the facts hash is not available here

@@ -3,7 +3,11 @@
describe 'augeas::lens' do
let (:title) { 'foo' }

lens_dir = Puppet.version < '4.0.0' ? '/usr/share/augeas/lenses' : '/opt/puppetlabs/puppet/share/augeas/lenses'
if Puppet.version >= '4.0.0' and facts[:rubysitedir] =~ /\/opt\/puppetlabs\/puppet/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

@mcanevet
Copy link
Member

mcanevet commented Jul 7, 2017

@bzed the unit tests failure definitely comes from your code. See my comments.

@bzed
Copy link
Contributor Author

bzed commented Jul 7, 2017

@mcanevet see my last comment. take it, fix it, or leave it broken. I don't have the time to bother with that mess call spec tests.

@mcanevet mcanevet closed this Jul 7, 2017
@bzed
Copy link
Contributor Author

bzed commented Jul 7, 2017

@mcanevet so whats your fix for #65 ?

@mcanevet
Copy link
Member

mcanevet commented Jul 7, 2017

@bzed I think your code would work.
I just closed your PR because it breaks the unit tests (which is unacceptable) and you obviously don't want to fix that (even if it's trivial).
If you don't have time "to bother with that mess call spec tests", then I can provide you the contact of our salesman. I'm sure he will be happy to provide you a quote so that we do it for you. :-)

@bzed
Copy link
Contributor Author

bzed commented Jul 7, 2017

@mcanevet well thanks, I can happily live with the broken spec tests - and with a fork. but I guess other users might be happy if they could just keep using your module.

@raphink
Copy link
Member

raphink commented Jul 7, 2017

@bzed having tests that pass is a common requirement for all serious open-source projects. In the current case, it really shouldn't be too hard to fix, especially as everything is already implemented and the tests pass on the master branch.

We understand other users might want to use this patch (although we don't) but we are not willing to maintain code that is untested, and even less code that breaks code that we need (even if it fixes another issue). If you need support on how to fix the tests, I'm sure you can find it on many IRC/slack Puppet channels, and we might even help you fix them if you ask, but we won't merge a PR that doesn't pass existing tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants